package com.myblog.manage.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.myblog.common.annotation.Excel;
import com.myblog.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 留言管理对象 tb_message
 * 
 * @author mingo_sheep
 * @date 2025-05-18
 */
public class Message extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 留言序号 */
    @Excel(name = "留言序号")
    private Long id;

    /** 留言内容 */
    @Excel(name = "留言内容")
    private String content;

    /** 留言用户的id */
    @Excel(name = "留言用户的id")
    private Long userId;

    /** 游客用户的昵称 */
    @Excel(name = "游客用户的昵称")
    private String nickName;

    /** 状态：0-待审核 1-已通过 2-已删除 3-已发布 */
    @Excel(name = "状态：0-待审核 1-已通过 2-已删除 3-已发布")
    private Long status;

    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setNickName(String nickName) 
    {
        this.nickName = nickName;
    }

    public String getNickName() 
    {
        return nickName;
    }

    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }

    public void setCreateTime(Date createTime){
        this.createTime = createTime;
    }
    public Date getCreateTime()
    {
        return createTime;
    }

    public void setUpdateTime(Date updateTime){
        this.updateTime = updateTime;
    }

    public Date getUpdateTime()
    {
        return updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("content", getContent())
            .append("userId", getUserId())
            .append("nickName", getNickName())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
